//////////////////////////////////////////////////////////////////////
// (c) 2003-2010 sonofdelphi
// MIT License
//////////////////////////////////////////////////////////////////////

#include<string.h>
#include<iostream>

class ArgumentParser;

class CHelper  
{
public:
	friend class CArgumentParser;
	
	char** getBuffer();
	CHelper(int nOptions);
	
	void fillSummary(char *strMessage);
	void fillAuthor(char *strMessage);
	void fillYear(char *strMessage);
	void fillOwner(char *strMessage);
	void fillProgramName(char *strMessage);
	void fillTailMessage(char *strMessage);
	void fillUsageLine(char *strMessage);
	
	void displayHelp();
	virtual ~CHelper();

protected:
	int m_nOptions;
	char** m_asHelp;		//Stores the help for the options
	
	//Display parameters
	char* m_sProgramName;		
	char* m_sAuthor;
	char* m_sOwner;
	char* m_sYear;
	char* m_sSummary;
	char* m_sUsageLine;
	char* m_sTailMessage;

	void fillHelpForOption(int nPos, char cOption, char *strValue);//Fill in help
private:
	void deleteAndCopy(char**dest,char*source);
};

